package com.itheima.factory;

import com.itheima.dao.UserDao;
import com.itheima.dao.impl.UserDaoImpl;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author: dh
 * @date: 2023-10-22 10:50
 * 创建一个UserDaoFactoryBean的类，实现FactoryBean的接口，重写其中的方法.
 */
public class UserDaoFactoryBean implements FactoryBean<UserDao> {

    @Override
    public UserDao getObject() throws Exception {

        return new UserDaoImpl();
    }

    @Override
    public Class<?> getObjectType() {

        return UserDao.class;
    }

    @Override
    public boolean isSingleton() {

        return false;
    }
}
